







<div class="x-body">
    <div class="layui-row">
        <form class="layui-form layui-col-md12 x-so">
            <input class="layui-input"  autocomplete="off" placeholder="开始日" name="date1"  value="{:input('date1')}" id="start">
            <input class="layui-input"  autocomplete="off" placeholder="截止日" name="date2"  value="{:input('date2')}" id="end">
            <input type="text" name="search_data"  placeholder="支持标题|用户名" autocomplete="off" value="{:input('search_data')}"  class="layui-input">
            <div class="layui-input-inline">
                <select name="class">
                    <option value="" >全部类型</option>
                    {volist name='class_list' id='vo'}
                    <option value="{$vo['id']}" {notempty name="param['class']"}{if condition="$param['class'] eq $vo['id']"} selected="selected" {/if}{/notempty} >{$vo['classname']}</option>
                    {/volist}
                </select>
            </div>
            <button class="layui-btn"  id="search"  url="{:url('worklist')}"  lay-submit="" lay-filter="sreach"><i class="layui-icon">&#xe615;</i></button>
        </form>
    </div>
    <xblock>
        <button class="layui-btn layui-btn-danger" onclick="delAll()"><i class="layui-icon"></i>批量删除</button>
        <span class="x-right" style="line-height:40px">共有数据：{$list.count} 条</span>
    </xblock>
    <table class="layui-table x-admin">
        <thead>
        <tr>
            <th>
                <div class="layui-unselect header layui-form-checkbox" lay-skin="primary"><i class="layui-icon">&#xe605;</i></div>
            </th>
            <th>序号</th>
            <th>会员工单信息</th>
            <th>描述问题</th>
            <th>附件图</th>
            <th>其它</th>
            <th class="status-th">状态</th>

            <th>操作</th>
        </thead>
        {notempty name='list.list'}
        <tbody>
        {volist name='list.list' id='vo' key="k"}
        <tr>
            <td>
                <div class="layui-unselect layui-form-checkbox" lay-skin="primary" data-id='{$vo.id}'><i class="layui-icon">&#xe605;</i></div>
            </td>
            <td>{$k}</td>
            <td>
                <div> <label>用户名:</label><span>{$vo.username}</span></div>
                <div> <label>手机号:</label><span>{$vo.mobile}</span></div>
                <div> <label>工单类型:</label><span>{$vo.cate.classname}</span></div>
            </td>
            <td>
                <div> <label>内容:</label><span>{$vo.content}</span></div>
            </td>

            <td>
                <img class="admin-list-img-size" src="{$vo.image}"/>
            </td>
            <td>
                <div> <label>生成时间:</label><span>{$vo.create_time}</span></div>
                <div> <label>结束时间:</label><span>{if condition="$vo['state'] eq 2"}{$vo.update_time}{else/}未结束{/if}</span></div>
                <div> <label>总耗时:</label><span>{if condition="$vo['state'] eq 2"}{$vo.deal_time}{else/}未结束{/if}</span></div>
            </td>
            <td>{$vo.state_text}</td>

            <td class="td-manage">

                <ob_link><a title="回复"  href="{:url('workEdit', array('id' => $vo['id']))}" >
                    <i class="layui-icon">&#xe642;</i>
                </a></ob_link>
                <ob_link><a title="删 除" class="ajax-get"  href="{:url('setStatus', array('ids' => $vo['id'], 'status' => -1))}" >
                    <i class="layui-icon">&#xe640;</i>
                </a></ob_link>

            </td>
        </tr>
        {/volist}
        {else/}
        <tbody><tr class="odd"><td colspan="12" class="text-center" valign="top">{:config('empty_list_describe')}</td></tr></tbody>
        {/notempty}

        </tbody>
    </table>
    <div class="page">
        {notempty name='list'}   {$list.list->render()}{/notempty}
    </div>

</div>
<script>
    layui.use('laydate', function(){

        var laydate = layui.laydate;

        //执行一个laydate实例
        laydate.render({
            elem: '#start' //指定元素
        });
        //执行一个laydate实例
        laydate.render({
            elem: '#end' //指定元素
        });

    });

      

       
    function delAll (argument) {

        var data = tableCheck.getData();


        layer.confirm('确认要删除吗？',function(index){
            //捉到所有被选中的，发异步进行删除
            //监听提交
            var url="{:url('setStatus')}";
            $.post(url,{ids:data,status:-1},function (d) {
                if(d.code==1){
                    $(".layui-form-checked").not('.header').parents('tr').remove();
                    layer.msg('删除成功', {icon: 1});

                }else{
                    layer.msg(d.msg);

                }
            },'json');



        });
    }
</script>

</body>

</html>


